﻿using System;
using System.Net;
using System.Diagnostics;

namespace Diagnostics_Demo
{
    class Diagnostics_Demo
    {
        static void Main(string[] args)
        {
            //using (Process myProcess = new Process())
            //{

            //    myProcess.StartInfo.FileName = "iexplore.exe";
            //    myProcess.StartInfo.Arguments = "http://www.baidu.com/";
            //    myProcess.Start();
            //}

            //EventLog log = new EventLog("MyLog", ".", "AnyLog");
            //log.WriteEntry("It's  a  my  Log.", EventLogEntryType.Information, 1);
            //foreach (EventLogEntry item in log.Entries)
            //{
            //    Console.WriteLine(item.Message);
            //}
            int num=100;
            Debug.Listeners.Add(new TextWriterTraceListener(Console.Out));
            Debug.Assert(num > 100, "num不大于 ");
            Debug.WriteLine(num);

            Console.ReadKey();
        }
    }
}
